home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.1 / play_speed.1 < prev    next >
Text File  |  1995-07-25  |  1KB  |  40 lines

  1.  
  2. play_speed is a simple program for playing raw (pcm) audio
  3. files out to /dev/audio at a specific sample rate.  I wrote
  4. it because I didn't have the netaudio utilities and I just
  5. wanted to play out audio files that I downloaded from IUMA
  6. (The Internet Underground Music Archive, URL
  7. "http://www.iuma.com/") and decompressed with maplay.
  8.  
  9. To compile: gcc -O2 -o play_speed play_speed.c
  10.  
  11. You will need the audio driver installed already, so that
  12. <sys/audio.h> will be present for the definition of the
  13. AUDIO_SAMPLE_RATE ioctl.  That's all you need the header
  14. file for; if you know what the ioctl is, but don't have
  15. that file, then just edit it in.  :)
  16.  
  17. To play a file, do: play_speed rate < file.pcm
  18.  
  19. For example, to play the output of an "maplay -s -8" from
  20. an MPEG-II coded file that was recorded at 44.1 kHz (so
  21. that the pcm file is at 22.05 kHz), where the pcm file is
  22. "/tmp/foo.pcm", do
  23.  
  24.     play_speed 22050 < /tmp/foo.pcm
  25.  
  26. and the sound will be played out /dev/audio.
  27.  
  28. This program shouldn't be necessary if you have netaudio.
  29.  
  30. Addendum 03-Aug-94 rr@sco.com :
  31. I have modified play_speed.c so that it can be compiled to use
  32. the Soundblaster driver included in tls022 and tls023. This
  33. entails #include'ing sb.h rather than audio.h, opening /dev/sbdsp
  34. rather than /dev/audio, and using the DSP_IOCTL_SPEED ioctl.
  35.  
  36. To compile play_speed for use with /dev/audio, use
  37.     gcc -D_AUDIO_ -O2 -o play_speed play_speed.c
  38. To compile play_speed for use with /dev/sbdsp, use 
  39.     gcc -O2 -o play_speed play_speed.c
  40.